/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * MainScreen.java
 *
 * Created on Mar 30, 2011, 9:44:10 PM
 */

package org.libarae.client;

import javax.swing.ImageIcon;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import org.libarae.communication.ClientInterface;
import org.libarae.communication.request.LogoutRequest;
import org.libarae.communication.response.LogoutResponse;
import org.libarae.communication.response.Response;

/**
 *
 * @author Ben
 */
@SuppressWarnings("serial")
public class MainScreen extends javax.swing.JFrame {

    Thread shutdownThread = new Thread() {
            public void run() {
                LogoutRequest r = new LogoutRequest();

                @SuppressWarnings("unused")
				Response response = null;

                try {
                    response = ClientInterface.sendRequest(r);
                }
                catch(Exception e)
                {
                    e.printStackTrace();
                }
            }
        };

    public enum Tabs {
        FEATURED,
        LIBRARY,
        BOOK_INFO,
        USER_PAGE,
        MAIL_BOX
    }

    /** Creates new form MainScreen */
    public MainScreen() {
        Runtime.getRuntime().addShutdownHook(shutdownThread);

        initComponents();

        tabPanel.setEnabledAt(2, false);
    }

    // Switches to the tab specified by the Tabs enum, for better readability.
    public void switchToTab(Tabs tab)
    {
        switch(tab)
        {
            case FEATURED:
                tabPanel.setSelectedComponent(scrFeatured);
                break;
            case LIBRARY:
                tabPanel.setSelectedComponent(scrLibrary);
                break;
            case BOOK_INFO:
                if(!tabPanel.isEnabledAt(2))
                    tabPanel.setEnabledAt(2, true);
                tabPanel.setSelectedComponent(scrBookInfo);
                break;
            case USER_PAGE:
                tabPanel.setSelectedComponent(scrUserPage);
                break;
            case MAIL_BOX:
                tabPanel.setSelectedComponent(scrMailbox);
                break;
        }
    }

    // Getters and setters

    public BookInfoPanel getBookInfoPanel()
    {
        return pnlBookInfo;
    }

    public UserPagePanel getUserPagePanel()
    {
        return pnlUserPage;
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlLeft = new javax.swing.JPanel();
        txtOmniSearch = new javax.swing.JTextField();
        btnOmniSearch = new javax.swing.JButton();
        pnlAdvancedSearch = new javax.swing.JPanel();
        lblTitle = new javax.swing.JLabel();
        lblAuthor = new javax.swing.JLabel();
        lblISBN = new javax.swing.JLabel();
        lblPublisher = new javax.swing.JLabel();
        lblPubDate = new javax.swing.JLabel();
        lblSummary = new javax.swing.JLabel();
        lblGeneral = new javax.swing.JLabel();
        lblStatus = new javax.swing.JLabel();
        txtTitle = new javax.swing.JTextField();
        txtAuthor = new javax.swing.JTextField();
        txtISBN = new javax.swing.JTextField();
        txtPublisher = new javax.swing.JTextField();
        txtPubDate = new javax.swing.JTextField();
        txtSummary = new javax.swing.JTextField();
        txtGeneral = new javax.swing.JTextField();
        cboStatus = new javax.swing.JComboBox();
        btnAdvancedSearch = new javax.swing.JButton();
        lblAdvancedSearch = new javax.swing.JLabel();
        pnlRight = new javax.swing.JPanel();
        tabPanel = new javax.swing.JTabbedPane();
        scrFeatured = new javax.swing.JScrollPane();
        pnlFeatured = new org.libarae.client.FeaturedBookPanel(this);
        scrLibrary = new javax.swing.JScrollPane();
        pnlLibrary = new org.libarae.client.LibraryPanel(this);
        scrBookInfo = new javax.swing.JScrollPane();
        pnlBookInfo = new org.libarae.client.BookInfoPanel(this);
        scrUserPage = new javax.swing.JScrollPane();
        pnlUserPage = new org.libarae.client.UserPagePanel(this);
        scrMailbox = new javax.swing.JScrollPane();
        pnlMailbox = new org.libarae.client.MailboxPanel();
        mbarMainMenu = new javax.swing.JMenuBar();
        mnuFile = new javax.swing.JMenu();
        mniLogout = new javax.swing.JMenuItem();
        mniExit = new javax.swing.JMenuItem();
        mnuPrefs = new javax.swing.JMenu();
        mniAccountInfo = new javax.swing.JMenuItem();
        mnuHelp = new javax.swing.JMenu();
        mniServerInfo = new javax.swing.JMenuItem();
        mniHelp = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Libarae");
        setIconImage(new ImageIcon(getClass().getResource("/res/icon.png")).getImage());
        setLocationByPlatform(true);

        txtOmniSearch.setText("Omni Search");

        btnOmniSearch.setText("Search");
        btnOmniSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnOmniSearchActionPerformed(evt);
            }
        });

        lblTitle.setText("Title:");

        lblAuthor.setText("Author:");

        lblISBN.setText("ISBN:");

        lblPublisher.setText("Publisher");

        lblPubDate.setText("Pub. Date:");

        lblSummary.setText("Summary:");

        lblGeneral.setText("All fields:");

        lblStatus.setText("Status:");

        cboStatus.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Any", "Available", "Pending", "Checked-Out" }));

        btnAdvancedSearch.setText("Advanced Search");
        btnAdvancedSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAdvancedSearchActionPerformed(evt);
            }
        });

        lblAdvancedSearch.setText("Advanced Search:");

        javax.swing.GroupLayout pnlAdvancedSearchLayout = new javax.swing.GroupLayout(pnlAdvancedSearch);
        pnlAdvancedSearch.setLayout(pnlAdvancedSearchLayout);
        pnlAdvancedSearchLayout.setHorizontalGroup(
            pnlAdvancedSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlAdvancedSearchLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlAdvancedSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnAdvancedSearch, javax.swing.GroupLayout.DEFAULT_SIZE, 168, Short.MAX_VALUE)
                    .addComponent(lblAdvancedSearch)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlAdvancedSearchLayout.createSequentialGroup()
                        .addGroup(pnlAdvancedSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblAuthor)
                            .addComponent(lblTitle)
                            .addComponent(lblISBN)
                            .addComponent(lblPublisher)
                            .addComponent(lblGeneral)
                            .addComponent(lblStatus)
                            .addComponent(lblPubDate)
                            .addComponent(lblSummary))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 8, Short.MAX_VALUE)
                        .addGroup(pnlAdvancedSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtPubDate)
                            .addComponent(cboStatus, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(txtGeneral)
                            .addComponent(txtPublisher, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(txtISBN)
                            .addComponent(txtAuthor, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(txtTitle, javax.swing.GroupLayout.DEFAULT_SIZE, 108, Short.MAX_VALUE)
                            .addComponent(txtSummary, javax.swing.GroupLayout.Alignment.TRAILING))))
                .addContainerGap())
        );
        pnlAdvancedSearchLayout.setVerticalGroup(
            pnlAdvancedSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlAdvancedSearchLayout.createSequentialGroup()
                .addGap(13, 13, 13)
                .addComponent(lblAdvancedSearch)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlAdvancedSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblTitle)
                    .addComponent(txtTitle, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlAdvancedSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblAuthor)
                    .addComponent(txtAuthor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlAdvancedSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblISBN)
                    .addComponent(txtISBN, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlAdvancedSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblPublisher, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtPublisher, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlAdvancedSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblPubDate, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtPubDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlAdvancedSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblSummary, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtSummary, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlAdvancedSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblGeneral)
                    .addComponent(txtGeneral, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(26, 26, 26)
                .addGroup(pnlAdvancedSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblStatus)
                    .addComponent(cboStatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(36, 36, 36)
                .addComponent(btnAdvancedSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout pnlLeftLayout = new javax.swing.GroupLayout(pnlLeft);
        pnlLeft.setLayout(pnlLeftLayout);
        pnlLeftLayout.setHorizontalGroup(
            pnlLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlLeftLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtOmniSearch, javax.swing.GroupLayout.DEFAULT_SIZE, 168, Short.MAX_VALUE)
                .addGap(10, 10, 10))
            .addComponent(pnlAdvancedSearch, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(pnlLeftLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnOmniSearch)
                .addContainerGap(113, Short.MAX_VALUE))
        );
        pnlLeftLayout.setVerticalGroup(
            pnlLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlLeftLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtOmniSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnOmniSearch)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(pnlAdvancedSearch, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlAdvancedSearch.setVisible(false);

        tabPanel.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                tabPanelStateChanged(evt);
            }
        });

        scrFeatured.setViewportView(pnlFeatured);

        tabPanel.addTab("Featured", scrFeatured);

        scrLibrary.setViewportView(pnlLibrary);

        tabPanel.addTab("Library", scrLibrary);

        scrBookInfo.setViewportView(pnlBookInfo);

        tabPanel.addTab("Book Info", scrBookInfo);

        scrUserPage.setViewportView(pnlUserPage);

        tabPanel.addTab("User Page", scrUserPage);

        scrMailbox.setViewportView(pnlMailbox);

        tabPanel.addTab("Mailbox", scrMailbox);

        javax.swing.GroupLayout pnlRightLayout = new javax.swing.GroupLayout(pnlRight);
        pnlRight.setLayout(pnlRightLayout);
        pnlRightLayout.setHorizontalGroup(
            pnlRightLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlRightLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(tabPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 544, Short.MAX_VALUE)
                .addContainerGap())
        );
        pnlRightLayout.setVerticalGroup(
            pnlRightLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlRightLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(tabPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 397, Short.MAX_VALUE)
                .addContainerGap())
        );

        tabPanel.getAccessibleContext().setAccessibleName("tab3");

        mnuFile.setText("File");

        mniLogout.setText("Logout");
        mniLogout.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mniLogoutActionPerformed(evt);
            }
        });
        mnuFile.add(mniLogout);

        mniExit.setText("Exit");
        mniExit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mniExitActionPerformed(evt);
            }
        });
        mnuFile.add(mniExit);

        mbarMainMenu.add(mnuFile);

        mnuPrefs.setText("Preferences");

        mniAccountInfo.setText("Account Info");
        mnuPrefs.add(mniAccountInfo);

        mbarMainMenu.add(mnuPrefs);

        mnuHelp.setText("Help");

        mniServerInfo.setText("Server Info");
        mnuHelp.add(mniServerInfo);

        mniHelp.setText("Help");
        mnuHelp.add(mniHelp);

        mbarMainMenu.add(mnuHelp);

        setJMenuBar(mbarMainMenu);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(pnlLeft, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pnlRight, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pnlLeft, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(pnlRight, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    // Exit when the user clicks on the Exit menu item
    private void mniExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mniExitActionPerformed
        System.exit(0);
    }//GEN-LAST:event_mniExitActionPerformed

    // Perform an "OmniSearch" and switch to the Library tab.
    private void btnOmniSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnOmniSearchActionPerformed
        pnlLibrary.search(txtOmniSearch.getText());
        tabPanel.setSelectedComponent(scrLibrary);
    }//GEN-LAST:event_btnOmniSearchActionPerformed


    // Send a LogoutRequest when user clicks the Logout menu item.
    private void mniLogoutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mniLogoutActionPerformed
        Runtime.getRuntime().removeShutdownHook(shutdownThread);

        LogoutRequest r = new LogoutRequest();

        Response response = null;

        try {
            response = ClientInterface.sendRequest(r);
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }

        if(response == null)
        {
            System.out.println("Error sending to or receiving from server.");
            return;
        }

        if(response.getStatus() == Response.STATUS_GOOD)
        {
            LoginScreen l = new LoginScreen();
            l.setVisible(true);

            this.dispose();
            return;
        }

        switch(response.getStatus())
        {
            case LogoutResponse.STATUS_FAILED_GENERIC:
                System.out.println("Something went wrong. We apologize.");
                break;
            case LogoutResponse.STATUS_FAILED_BAD_KEY:
                System.out.println("The key sent by the client was bad.");
                break;
            default:
                System.out.println("Response status: " + response.getStatus());
                break;
        }
    }//GEN-LAST:event_mniLogoutActionPerformed

    // Send requests to the server to refresh certain tabs when they are selected.
    private void tabPanelStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_tabPanelStateChanged
        if(tabPanel.getSelectedComponent() == scrFeatured)
        {
            pnlFeatured.refreshLists();
        }

        if(tabPanel.getSelectedComponent() == scrBookInfo)
        {
            pnlBookInfo.refreshBook();
        }

        if(tabPanel.getSelectedComponent() == scrLibrary)
        {
            pnlLibrary.refreshList();
            pnlAdvancedSearch.setVisible(true);
        }
        else
        {
            pnlAdvancedSearch.setVisible(false);
        }

        if(tabPanel.getSelectedComponent() == scrUserPage)
        {
            pnlUserPage.refreshLists();
        }

        if(tabPanel.getSelectedComponent() == scrMailbox)
        {
            pnlMailbox.refreshMailbox();
        }
    }//GEN-LAST:event_tabPanelStateChanged

    private void btnAdvancedSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAdvancedSearchActionPerformed
        pnlLibrary.search(txtTitle.getText(),
                          txtAuthor.getText(),
                          txtISBN.getText(),
                          txtPublisher.getText(),
                          txtPubDate.getText(),
                          txtSummary.getText(),
                          txtGeneral.getText(),
                          cboStatus.getSelectedItem().toString()
                          );
        tabPanel.setSelectedComponent(scrLibrary);
    }//GEN-LAST:event_btnAdvancedSearchActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        try {
                // Set System L&F
            UIManager.setLookAndFeel(
                UIManager.getSystemLookAndFeelClassName());
        }
        catch (UnsupportedLookAndFeelException e) {
           // handle exception
            System.err.println("Unable to set look and feel.");
            System.err.println(e.getMessage());
            System.exit(1);
        }
        catch (ClassNotFoundException e) {
           // handle exception
            System.err.println("Unable to set look and feel.");
            System.err.println(e.getMessage());
            System.exit(1);
        }
        catch (InstantiationException e) {
           // handle exception
            System.err.println("Unable to set look and feel.");
            System.err.println(e.getMessage());
            System.exit(1);
        }
        catch (IllegalAccessException e) {
           // handle exception
            System.err.println("Unable to set look and feel.");
            System.err.println(e.getMessage());
            System.exit(1);
        }

        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new MainScreen().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAdvancedSearch;
    private javax.swing.JButton btnOmniSearch;
    private javax.swing.JComboBox cboStatus;
    private javax.swing.JLabel lblAdvancedSearch;
    private javax.swing.JLabel lblAuthor;
    private javax.swing.JLabel lblGeneral;
    private javax.swing.JLabel lblISBN;
    private javax.swing.JLabel lblPubDate;
    private javax.swing.JLabel lblPublisher;
    private javax.swing.JLabel lblStatus;
    private javax.swing.JLabel lblSummary;
    private javax.swing.JLabel lblTitle;
    private javax.swing.JMenuBar mbarMainMenu;
    private javax.swing.JMenuItem mniAccountInfo;
    private javax.swing.JMenuItem mniExit;
    private javax.swing.JMenuItem mniHelp;
    private javax.swing.JMenuItem mniLogout;
    private javax.swing.JMenuItem mniServerInfo;
    private javax.swing.JMenu mnuFile;
    private javax.swing.JMenu mnuHelp;
    private javax.swing.JMenu mnuPrefs;
    private javax.swing.JPanel pnlAdvancedSearch;
    private org.libarae.client.BookInfoPanel pnlBookInfo;
    private org.libarae.client.FeaturedBookPanel pnlFeatured;
    private javax.swing.JPanel pnlLeft;
    private org.libarae.client.LibraryPanel pnlLibrary;
    private org.libarae.client.MailboxPanel pnlMailbox;
    private javax.swing.JPanel pnlRight;
    private org.libarae.client.UserPagePanel pnlUserPage;
    private javax.swing.JScrollPane scrBookInfo;
    private javax.swing.JScrollPane scrFeatured;
    private javax.swing.JScrollPane scrLibrary;
    private javax.swing.JScrollPane scrMailbox;
    private javax.swing.JScrollPane scrUserPage;
    private javax.swing.JTabbedPane tabPanel;
    private javax.swing.JTextField txtAuthor;
    private javax.swing.JTextField txtGeneral;
    private javax.swing.JTextField txtISBN;
    private javax.swing.JTextField txtOmniSearch;
    private javax.swing.JTextField txtPubDate;
    private javax.swing.JTextField txtPublisher;
    private javax.swing.JTextField txtSummary;
    private javax.swing.JTextField txtTitle;
    // End of variables declaration//GEN-END:variables

}
